﻿<UserControl x:Class="PeteBrown.ConferenceTrivia.Controls.TriviaItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="350" d:DesignWidth="1000">
	<UserControl.Resources>
		<Storyboard x:Name="DisplayQuestionAndAnswer">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="QuestionText">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:15" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:17" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:26" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:28" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="AnswerText">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:15" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:17" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:26" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:28" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.Rotation)" Storyboard.TargetName="QuestionText">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:5" Value="-1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:15" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleX)" Storyboard.TargetName="AnswerText">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:15" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:28" Value="1.1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.ScaleY)" Storyboard.TargetName="AnswerText">
				<EasingDoubleKeyFrame KeyTime="0" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:15" Value="1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:28" Value="1.1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="QuestionText">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="QuestionText">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:5" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="AnswerText">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:15" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:28" Value="-40"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="AnswerText">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:15" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:28" Value="-15"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
        <Image Source="../Assets/Mist.png"
               HorizontalAlignment="Stretch"
               Opacity="0.25"
               Stretch="Fill" />
        <Grid HorizontalAlignment="Right"
              Margin="25 0 25 0"
              VerticalAlignment="Center">
            <TextBlock x:Name="QuestionText"
                       Text="{Binding CurrentTriviaItem.Question}"
                       Style="{StaticResource TriviaQuestionStyle}"
                       RenderTransformOrigin="0.5,0.5"
                       TextOptions.TextHintingMode="Animated">
            	<TextBlock.RenderTransform>
            		<CompositeTransform/>
            	</TextBlock.RenderTransform>
                        <TextBlock.Effect>
                            <DropShadowEffect BlurRadius="15"
                                              Color="Black"
                                              ShadowDepth="0" />
                        </TextBlock.Effect>
            </TextBlock>
            <TextBlock x:Name="AnswerText"
                       Text="{Binding CurrentTriviaItem.Answer}"
                       Style="{StaticResource TriviaQuestionStyle}"
                       RenderTransformOrigin="0.5,0.5"
                       TextOptions.TextHintingMode="Animated">
            	<TextBlock.RenderTransform>
            		<CompositeTransform/>
            	</TextBlock.RenderTransform>
                        <TextBlock.Effect>
                            <DropShadowEffect BlurRadius="15"
                                              Color="Black"
                                              ShadowDepth="0" />
                        </TextBlock.Effect>
            </TextBlock>
        </Grid>

    </Grid>
</UserControl>
